{
  "properties" : { },
  "id" : "40d44022c4d7457fa085c38ef971415d",
  "script" : null,
  "groupId" : "68719da205814eb7a280a2e729cd0d8f",
  "name" : "执行任务",
  "createTime" : null,
  "updateTime" : 1741424548652,
  "lock" : null,
  "createBy" : "管理员",
  "updateBy" : "管理员",
  "path" : "task",
  "method" : "GET",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 200,\n    \"msg\": \"success\",\n    \"data\": \"/nopenjdk version \\\"17.0.12\\\" 2024-07-16/nOpenJDK Runtime Environment (Alibaba Dragonwell Standard Edition)-17.0.12.0.13+7-GA (build 17.0.12+7)/nOpenJDK 64-Bit Server VM (Alibaba Dragonwell Standard Edition)-17.0.12.0.13+7-GA (build 17.0.12+7, mixed mode, sharing)\"\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import java.io.BufferedReader;
import java.io.InputStreamReader;

Process process = Runtime.getRuntime().exec("java -version");
var s = '';
var out = [];

BufferedReader stdInput = new BufferedReader(new InputStreamReader(process.getInputStream()));
while ((s = stdInput.readLine()) != null) {
    out.add(s);
}
BufferedReader stdError  = new BufferedReader(new InputStreamReader(process.getErrorStream()));
while ((s = stdError.readLine()) != null) {
    out.add(s);
}

return out;